package com.qifan.energy.adapter;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.qifan.energy.R;

import java.util.List;

public class CollegeListAdapter extends BaseQuickAdapter<String,BaseViewHolder> {

    public CollegeListAdapter(@Nullable List<String> data) {
        super(R.layout.college_list_item, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, String item) {
        helper.setText(R.id.title_tv,item);

        if (helper.getAdapterPosition() == 0) {
            helper.setImageResource(R.id.right_iv,R.mipmap.ic_game_playernotice);
        } else if (helper.getAdapterPosition() == 1) {
            helper.setImageResource(R.id.right_iv,R.mipmap.ic_game_cooperation);
        }
    }
}
